﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_Linkman_GetCustomLinkmanTypeByCustomLinkmanID]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_Linkman_GetCustomLinkmanTypeByCustomLinkmanID];
GO
CREATE PROCEDURE [dbo].[sproc_Linkman_GetCustomLinkmanTypeByCustomLinkmanID]
@id int
/*----------------------------------------------
功能：得到自定义联系人的分类
参数：
    @id    自定义联系人id
-----------------------------------------------*/
AS
    SELECT a.Type FROM UDS_Linkman_CustomLinkmanType a,UDS_Linkman_TypeOfCustomLinkman b
    WHERE a.id=b.TypeID AND b.CustomLinkmanID=@id